package File;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LXW
 * Date: 2022-04-04
 * Time: 13:28
 */
public class Demo8 {
    public static void main(String[] args) {
        try(InputStream is = new FileInputStream("hello-world")) {
            while(true) {
                int i = is.read();
                if(i == -1) {
                    break;
                }
                System.out.println(i);
            }
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
